package com.ptms.dto;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

// 学员注册DTO（Lombok优化，使用@Data简化getter/setter等方法）
@Data
public class StudentRegisterDTO {
    @NotBlank(message = "用户名不能为空")
    @Size(min = 4, max = 16, message = "用户名长度需在4-16位之间")
    private String username;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度需在6-20位之间")
    private String password;

    @NotBlank(message = "真实姓名不能为空")
    private String realName;

    @NotBlank(message = "手机号不能为空")
    @Size(min = 11, max = 11, message = "手机号格式错误")
    private String phone;

    @NotBlank(message = "性别不能为空")
    private String gender;

    @NotNull(message = "年龄不能为空")
    @Min(value = 5, message = "年龄不能小于5岁")
    @Max(value = 100, message = "年龄不能大于100岁")
    private Integer age;
    // 新增校区ID字段
    @NotNull(message = "校区ID不能为空")
    private Long campus_id;

    private String email;  // 非必填，可空
}